<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script>
description('Sync XHR should not turn async due to revalidation.');
window.jsTestIsAsync = true;
const url  = '/cache/resources/etag-200.php?' +
             Math.floor(100000000 * Math.random());

xhr1 = new XMLHttpRequest();
xhr2SendIsReturned = false;
xhr1.open('GET', url, true);
xhr1.onload = function() {
  setTimeout(function() {
    xhr2 = new XMLHttpRequest();
    xhr2.open('GET', url, false);
    xhr2.onload = function() {
      shouldBeFalse("xhr2SendIsReturned");
      shouldNotBe("xhr1.responseText", "xhr2.responseText");
      finishJSTest();
    };
    xhr2.send();
    xhr2SendIsReturned = true;
  }, 0);
}
xhr1.send();
</script>
</body>
</html>
